export const TYPE = 2
export const leftSearchConfig = [
  {
    type: 'input',
    value: '',
    label: '',
    keyIndex: 'title',
    placeholder: '请输入标题',
    // rules: { required: true, message: '请输入第一个输入框的内容', trigger: 'change' },
    span: 6,
    visible: true
  },
  {
    type: 'select',
    value: '',
    options: [],
    label: '',
    keyIndex: 'typeId',
    placeholder: '请选择分类',
    span: 6,
    multiple: false,
    collapseTags: true
  },
  {
    type: 'select',
    value: '',
    options: [
      {
        value: '0',
        label: '未发布'
      },
      {
        value: '1',
        label: '发布'
      }
    ],
    label: '',
    keyIndex: 'status',
    placeholder: '请选择发布动态',
    span: 6,
    multiple: false,
    collapseTags: true
  }
]

export const middleSearchConfig = [
  {
    type: 'input',
    value: '',
    label: '',
    keyIndex: 'title',
    placeholder: '请输入分类名称',
    span: 8,
    size: 'small',
    visible: true
  },
  {
    type: 'select',
    value: '',
    label: '',
    keyIndex: 'status',
    placeholder: '请选择发布状态',
    span: 8,
    visible: true,
    size: 'small',
    options: [
      {
        label: '已发布',
        value: '1'
      },
      {
        label: '未发布',
        value: '0'
      }
    ]
  }
]

export const leftTableConfig = {
  colums: [
    {
      props: 'id',
      label: 'ID',
      slot: 'id'
    },
    {
      props: 'title',
      label: '标题',
      slot: 'title',
      width: '200'
    },
    {
      props: 'creator',
      label: '创建人'
    },
    {
      props: 'newsTypeName',
      label: '分类'
    },
    // {
    //   props: "statusName",
    //   label: "发布状态"
    // },
    // {
    //   props: "isTop",
    //   label: "置顶权限值"
    // },
    {
      props: 'viewNum',
      label: '点击量'
    },
    {
      props: 'releaseTimeStr',
      label: '发布时间',
      sortable: true
    },
    {
      props: 'updateTimeStr',
      label: '更新时间',
      sortable: true
    },
    {
      props: 'updater',
      label: '最近操作'
    }
  ],
  showSelection: true
}

export const addPopFormConfig = [
  {
    type: 'input',
    value: '',
    label: '标题',
    keyIndex: 'title',
    placeholder: '请输入标题',
    rules: { required: true, message: '请输入第一个输入框的内容', trigger: 'change' },
    span: 24,
    visible: true,
    inputWidth: '800px',
    maxlength: 50,
    inputType: 'text'
  },
  {
    type: 'select',
    value: '',
    label: '栏目',
    keyIndex: 'typeId',
    placeholder: '请输入标题',
    options: [],
    rules: { required: true, message: '请输入第二个输入框的内容', trigger: 'change' },
    span: 24,
    visible: true,
    inputWidth: '800px'
  },
  {
    type: 'uploadImg',
    value: '',
    label: '封面',
    keyIndex: 'headUrl',
    span: 24,
    visible: true,
    tips: ',建议尺寸为 160px * 220px 或等比例缩放图片'
  },
  {
    type: 'radio',
    value: '0',
    label: '状态',
    keyIndex: 'status',
    span: 24,
    options: [
      {
        value: '0',
        label: '未发布'
      },
      {
        value: '1',
        label: '发布'
      }
    ]
  }
  // {
  //   type: 'textarea',
  //   value: '',
  //   label: '副标题',
  //   keyIndex: 'subtitle',
  //   placeholder: '请输入副标题',
  //   // rules: { required: true, message: '请输入副标题', trigger: 'change' },
  //   span: 24,
  //   visible: true,
  //   inputWidth: '800px',
  //   maxlength: 300,
  //   inputType: 'text',
  //   autosize: { minRows: 1, maxRows: 3 }
  // },
  // {
  //   type: 'textarea',
  //   value: '',
  //   label: '文章摘要',
  //   keyIndex: 'remark',
  //   placeholder: '请输入文章摘要',
  //   span: 24,
  //   visible: true,
  //   // rules: { required: true, message: '请输入文章摘要', trigger: 'change' },
  //   inputWidth: '800px',
  //   maxlength: 300,
  //   autosize: { minRows: 2, maxRows: 7 }
  // },
//   {
//     type: 'uploadImg',
//     value: '',
//     label: '小程序分享图片',
//     keyIndex: 'appletUrl',
//     span: 24,
//     visible: true
//   }
]

export const uploadConfig = [
  // files
  {
    type: 'files',
    value: '',
    label: '文件',
    keyIndex: 'pdfUrl',
    visible: true
  },
  {
    type: 'video',
    value: '',
    label: '视频',
    keyIndex: 'videoUrl',
    visible: true
  }
]

export const resultTypeConfig = [
  {
    type: 'input',
    value: '',
    label: '名称',
    keyIndex: 'name',
    placeholder: '输入名称。100字以内',
    span: 24,
    rules: { required: true, message: '请输入名称', trigger: 'change' },
    visible: true,
    inputWidth: '300px'
  },
  {
    type: 'radio',
    value: '0',
    label: '发布状态',
    keyIndex: 'status',
    span: 24,
    options: [
      {
        value: '1',
        label: '发布'
      },
      {
        value: '0',
        label: '未发布'
      }
    ]
  }
]

export const resultClassifiyConfig = {
  colums: [
    {
      props: 'name',
      label: '分类名称'
    },
    {
      props: 'childNum',
      label: '数量'
    },
    {
      props: 'releaseTimeStr',
      label: '上架时间',
      sortable: true
    },
    {
      props: 'updateTimeStr',
      label: '最近更新时间',
      sortable: true
    },
    {
      props: 'statusName',
      label: '发布状态'
    },
    {
      props: 'creator',
      label: '创建人'
    }
  ]
}
